/**
 *  会员模块接口
 * **/

import request from '@/common/request.js';
import {
	HTTP_REQUEST_URL
} from '@/config.js';

const user_api = {};

// 获取token
user_api.getToken = data => request.globalRequest({
	methods: 'POST',
	url: HTTP_REQUEST_URL + '/user/token.do',
	data: data
});

// 用户登录
user_api.login = data => request.globalRequest({
	methods: 'POST',
	url: HTTP_REQUEST_URL + '/user/login.do',
	data: data
});

// 意见反馈
user_api.advise = data => request.globalRequest({
	methods: 'POST',
	url:  HTTP_REQUEST_URL+"/user/advise.do",
	data: data
});

// 发送验证码
user_api.sendSms = data => request.globalRequest({
	methods: 'POST',
	url: HTTP_REQUEST_URL + '/user/sendsms.do',
	data: data
});

// 检测验证码
user_api.checkSms = data => request.globalRequest({
	methods: 'POST',
	url: HTTP_REQUEST_URL + '/user/smsyzm.do',
	data: data
});

// 获取版本信息
user_api.getVersion = data => request.globalRequest({
	methods: 'POST',
	url: 'http://ruifengbio.agri120.org/ruifengplus/appls.php',//'http://ruifengbio.agri120.org/plus/appls.php',  
	data: data, 
}); 

// 更新信息
user_api.updateUserInfo = data => request.globalRequest({
	methods: 'POST',
	url: HTTP_REQUEST_URL + '/user/update.do',
	data: data
});


//获取版本更新信息
user_api.getVersionLog = data => request.globalRequest({
	methods: 'POST',
	url: 'http://ruifengbio.agri120.org/ruifengplus/appls.php?act=packagelist',
	data: data
});





export default user_api;
